<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()
			+request.getContextPath()+"/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<base href="<%=basePath%>">
<title>用户信息管理</title>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!--HTML5 shim和Respond.js是为了让IE8支持HTML5元素和媒体查询（media queries）功能  -->
<!--警告：通过file：//协议（就是直接将html 页面拖拽到浏览器中）访问页面时Respond.js不起作用  -->
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<table class="table table-striped table-hover">
					<tr>
						<td>编号</td>
						<td>姓名</td>
						<td>性别</td>
						<td>入校日期</td>
						<td>当前宿舍</td>
						<td>现有人数</td>
						<td>操作</td>
					</tr>
					<c:forEach items="${hostels }" var="hostel" varStatus="status">
					<tr>
						<td>${status.index+1 }</td>
						<td>${hostel.student.name }</td>
						<td>${hostel.student.gender }</td>
						<td>${hostel.student.enter_date }</td>
						<td>${hostel.dorm.dname }</td>
						<td>${hostel.dorm.stu_number }</td>
						<td><a class="btn btn-warning btn-xs" href="/hostelform/${hostel.id }">更换宿舍</a></td>
					</tr>
					</c:forEach>
				</table>
			 </div>
		</div>
	</div>

<!--jquery（bootstrap的所有javascript 插件都依赖jquery，所以必须放在前边）  -->
<script src="vendor/jquery/jquery.min.js"></script>
<!--加载Bootstrap的所有Javascript插件。你也可以根据需要只加载单个插件  -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>